import request from "@/utils/request";


export function listSelect(query) {
  return request({
    url: "/wechat-user-dept/pageSelect",
    method: "get",
    params: query,
  });
}

export function getUserPage(query) {
  return request({
    url: "/wechat-user-dept/getUserPage",
    method: "get",
    params: query,
  });
}

export function editUser(query) {
  return request({
    url: "/wechat-user-dept/editUser",
    method: "put",
    data: query,
  });
}

export function treeSelectdept() {
  return request({
    url: "/wechat-user-dept/treeSelect",
    method: "get",
  });
}

export function addDept(data) {
  return request({
    url: "/wechat-user-dept/add",
    method: "post",
    data:data,
  });
}


// 删除部门
export function delDept(deptId) {
  return request({
    url: "/wechat-user-dept/" + deptId,
    method: "delete",
  });
}


// 查询部门详细
export function getDept(deptId) {
  return request({
    url: "/wechat-user-dept/" + deptId,
    method: "get",
  });
}

// 修改部门
export function updateDept(data) {
  return request({
    url: "/wechat-user-dept",
    method: "put",
    data: data,
  });
}
